

/************************************************************
*     1     *        2      *       3       *      4        *
*           *               *               *               *
*************************************************************
*           *                               *               *
*     5     *               6               *      7        *
*           *                               *               *
*************************************************************
*     8     *        9      *       10      *      11       *
*           *               *               *               *
************************************************************/

typedef enum
{
    noz,
    zone1,
    zone2,
    zone3,
    zone4,
    zone_FG,
    zone_ICONE,
    zone_FD,
    zone8,
    zone9,
    zone10,
    zone11,
}screenZone;

/* Select SPI TOUCH: Chip Select pin high */
#define SPI_TOUCH_CS_LOW()       GPIO_ResetBits(GPIOB, GPIO_Pin_7)
/* Deselect SPI FLASH: Chip Select pin high */
#define SPI_TOUCH_CS_HIGH()      GPIO_SetBits(GPIOB, GPIO_Pin_7)

void GPIO_Configuration();
void SPI_config();
void touch_init();

unsigned char SPI_WriteByte(unsigned char data);
void SpiDelay(unsigned int DelayCnt);
u16 TPReadX(void);
u16 TPReadY(void);
int  GUI_TOUCH_X_MeasureX(void);
int  GUI_TOUCH_X_MeasureY(void);
screenZone GetScreenZone();
u16 readAmbiantTemp();